;; Sri Ganeshji : Sri Balaji : Sri Pitreshwarji : Sri Durgaji : Sri Venkateshwara

/*
Objective(s)  
- 	This program demonstrates the data retrieval from an external UNICODE XML File 
	available at any predefined URL
-	The XML data thus fetched from the XML File is displayed in a Report.

Syntax -
-	Collection Attribute 'Remote URL' Syntax
	Remote URL 	: <URL Specification>

Last modification  
-	Altered on 07/11/2009

Dependencies -
-	Supporting file 'XML Data.txt'
-	XML Data Unicode File 'TestXML.XML' which must be available at C:\INETPUB\WWWROOT in
	case if IIS is setup as the Web Server
*/

;; Report Displaying XML Data 

[Report: XML Get Collection]

	Form 	: XML Get Collection
	Title 	: "Simple Get Request "

[Form: XML Get Collection]

	Height	: 100% Screen
	Width	: 100% Screen
	Parts	: XML Get Collection, XMLData
		
[Part: XML Get Collection]

	Lines	: XML Get Collection
	Repeat	: XML Get Collection : XML Get Collection
	Scroll  : Vertical
			
	[Line: XML Get Collection]

		Fields	: XML Name, XMLEmp ID
		Explode : XML Phone
		Explode : XML Add
		
		[Field: XMLName]

			Set As 	: "Name : " + $NAME
		
		[Field: XMLEmp ID]

			Set As 	: "Employee ID :" +  $EMPID
			Indent 	: 10

;; Explode Part - XML Phone

[Part: XML Phone]

	Lines 	: XML Get CollPhone
	Repeat 	: XML Get CollPhone		: Phone
	Scroll	: Vertical

	[Line: XML Get CollPhone]

		Fields	: Name Field , XML Office,XML Home, XML Mobile
		Local 	: Field	: Name Field	: Set As 	: "Phone No"
			
		[Field: XML Office]

			Set As 	: "Office:" + $OfficeNo
		
		[Field: XML Home]

			Set As 	: "Home :" + $HomeNo
		
		[Field: XML Mobile]

			Set As 	: "Mobile :" + $Mobile				
			
;; Explode Part - XML Add

[Part: XML Add]

	Lines	: XML Get CollAdd
	Repeat 	: XML Get CollAdd 	: Address
	Scroll	: Vertical

	[Line: XML Get CollAdd]

		Fields	: XML Add1
		Explode : XML Addr Line

		[Field: XML Add1]

			Use 	: Name Field
			Set As 	: "Address"

;; Explode Part - XML Addr Line

[Part: XML Addr Line]

	Lines	: XML Get Addrline
	Repeat 	: XML Get Addrline 	: AddrLine
	Scroll	: Vertical

	[Line: XML Get Addrline]

		Fields	: XML Add2

		[Field: XML Add2]

			Set As 	: $ADDRLINE
			Indent 	: 5

;; Collection retrieving data from an XML file located at a predefined URL 

[Collection: XML Get Collection]

	Remote URL 	: "http://Localhost/TestXML.xml"  ;;URL specification
	Client Only	: Yes

;; End-of-File
